<template>
    <div>
        <a-table
        size="small"
        :rowSelection="{...rowSelection, onChange:onChange}"
        :columns="columns"
        rowKey="id"
        :dataSource="dataSource"
        :pagination="pagination"
        />
    </div>
</template>
<script>
export default {
    name:'selectTable',
    components:{},
    props:{
        columns:{
            type:Array,
            default:[]
        },
        rowSelection:{
            type:Object,
            default:{}
        },
        dataSource:{
            type:Array,
            default:[]
        },
        
    },
    data(){
        return{
            pagination:{
                position:'bottom',//指定分页显示的位置 'top' | 'bottom' | 'both'
                pageSize: 10,
                current: 1,
                total: 0,
                // showTotal: (total, range) => {
                //     // return this.$t('m.common.label.page_total', [range[0], range[1], total])
                //     return range[0] + "-" + range[1] + " 共" + total + "条"
                // },
                // showSizeChanger: true,
                // showQuickJumper:true,
                // pageSizeOptions: ['10', '30', '50', '100','200','500','1000'],
                // showLessItems:true
            },

        }
    },
    mounted(){
        
    },
    watch:{
       
    },
   
    methods:{
        onChange(key,item){
            this.$emit('onChange',key,item)
        }

    }
}
</script>
<style >
.ant-table-thead > tr >th{
 
 color: rgb(51,51,51)  !important;
 font-weight: 600 !important;   
  background: rgb(222, 229, 237) !important;
 }
 .ant-table td { white-space: nowrap !important; }

</style>